package net.jescort.web.servlet.controller.post;

import net.jescort.domain.forum.Post;
import org.apache.commons.lang.StringUtils;
import org.springframework.validation.Errors;

public class PostValidator
{
    public void validate(Post post, Errors errors)
    {
        if (StringUtils.isBlank(post.getContent()))
        {
            errors.rejectValue("content", "required", "required");
        }
    }
}
